package logic.sendingdevices;

import java.util.ArrayList;

import logic.regulardevices.RegularDevice;
import Logic.main.VirtualHouse;

public class Door extends SendingDevice {

	private boolean open = false; //open means true, or "on".
	
	public Door(VirtualHouse vh) {
		super(vh);
		id="do";
		cmds = new ArrayList<String>();
	}
	
	@Override
	public String receiveAndRespond(String cmd) {
		if(cmd.equals("check"))
				return check();
		return null;
	}

	@Override
	public String check() {
		if(open) return "on";
		return "off";
	}

	@Override
	public String test() {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public String SendMessage() {
		if(open) return "on";
		return "off";	
	}

}
